package com.gang.mars.redisson.lock;

import java.util.concurrent.locks.ReentrantLock;

/**
 * 语意
 * 线程第一次在节点1获取锁成功
 *
 * 线程程第二次在节点2获取锁成功
 *
 * 此为锁从入
 * */

public class ThreadLockConcept {

    public static void main(String[] args) {
        ReentrantLock lock = new ReentrantLock();

        new Thread(()->{

            lock.lock();//1

            System.out.println(Thread.currentThread().getName() + " 线程");

            lock.lock();//2

        },"线程1").start();




    }
}
